package com.yxy.ms.manager.config;

import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationProperty;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * <类文件描述> Druid配置数据源信息组件
 *
 * @author yangcheng6327
 */
@Configuration
@EnableTransactionManagement
public class DruidDataSourceConfig implements EnvironmentAware {
    @Override
    public void setEnvironment(Environment env) {
        Binder.get(env).bind("spring.datasource", ConfigurationProperty.class);
    }

}